package com.suitsoft.ut.service.account;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suitsoft.ut.dao.account.SystemInfoDao;
import com.suitsoft.ut.entity.system.STreeInfo;
import com.suitsoft.ut.entity.system.SystemInfo;

/**
 * 系统参数管理类.
 * 
 * @author kxx
 */
@Service
@Transactional
public class SystemInfoManager {
	@Autowired
	private SystemInfoDao systemInfoDao;

	/** 根据 系统参数类别 查找子项列表 */
	public List<SystemInfo> findSystemInfoByCategory(Long value) {
		return systemInfoDao.getSystemInfoBySystemCategory(value);
	}

	/**根据ID 查找标题   */
	public STreeInfo findTree(Long id) {
		return systemInfoDao.findtree(id);
	}

	public void updateTree(STreeInfo po) {
		systemInfoDao.updatetree(po);
	}
	
	public SystemInfo get(Long id){
		return systemInfoDao.get(id);
	}
	
	public void save(SystemInfo systemInfo){
		systemInfoDao.save(systemInfo);
	}
	
	public void delete(Long id){
		systemInfoDao.delete(id);
	}
	
	public List<SystemInfo> getAll(){
		return systemInfoDao.getAll();
	}
}
